import collections
class Solution(object):
    def makeEqual(self, words):
        d = collections.defaultdict(int)
        for word in words:
            for c in word:
                d[c] += 1
        n = len(words)
        for key in d:
            if d[key] % n:
                return False
        return True
